package com.oss.web;

import javax.servlet.ServletContext;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.context.ServletContextAware;

import com.oss.robot.ClassfyRobot;
import com.oss.robot.SiteRobot;
import com.oss.robot.StatRobot;
import com.oss.robot.link.DZoneRobot;
import com.oss.robot.link.InfoQRobot;
import com.oss.robot.link.JavaWorldRobot;
import com.oss.robot.link.TheServerSideRobot;
import com.oss.robot.project.ApacheRobot;
import com.oss.robot.project.JBossRobot;
import com.oss.robot.project.MuleSoftRobot;
import com.oss.robot.project.OpenSymphonyRobot;
import com.oss.robot.project.SpringSourceRobot;
import com.oss.service.LinkService;
import com.oss.service.ProjectService;
import com.oss.service.SiteService;
import com.oss.service.TagService;
import com.oss.service.TaskService;
import com.oss.service.TopicService;
import com.oss.service.system.CacheService;
import com.oss.service.system.SystemService;

/**
 * @author xueqiang.mi
 * @date 2010-2-10
 */
public abstract class BaseController implements ServletContextAware {

	static public final long DEFAULT_INDEX = 1;
	static public final long PRJ_SMALL_SIZE = 8;
	static public final long PRJ_MEDIUM_SIZE = 12;
	static public final long PRJ_LARGE_SIZE = 50;
	static public final long TPC_SMALL_SIZE = 8;
	static public final long TPC_MEDIUM_SIZE = 12;
	static public final long TPC_LARGE_SIZE = 50;
	static public final long LNK_SMALL_SIZE = 12;
	static public final long LNK_MEDIUM_SIZE = 25;
	static public final long LNK_LARGE_SIZE = 60;

	@Autowired
	protected ClassfyRobot classfyRobot;
	@Autowired
	protected SiteRobot siteRobot;
	@Autowired
	protected StatRobot statRobot;

	@Autowired
	protected ApacheRobot apacheRobot;
	@Autowired
	protected JBossRobot jbossRobot;
	@Autowired
	protected MuleSoftRobot muleSoftRobot;
	@Autowired
	protected OpenSymphonyRobot openSymphonyRobot;
	@Autowired
	protected SpringSourceRobot springSourceRobot;

	@Autowired
	protected DZoneRobot dzoneRobot;
	@Autowired
	protected JavaWorldRobot javaWorldRobot;
	@Autowired
	protected InfoQRobot infoQRobot;
	@Autowired
	protected TheServerSideRobot tssRobot;

	@Autowired
	protected LinkService lnkService;
	@Autowired
	protected ProjectService prjService;
	@Autowired
	protected SiteService siteService;
	@Autowired
	protected TagService tagService;
	@Autowired
	protected TaskService taskService;
	@Autowired
	protected TopicService topicService;

	@Autowired
	protected CacheService cacheService;
	@Autowired
	protected SystemService systemService;

	protected ServletContext servletContext;

	@Override
	public void setServletContext(ServletContext servletContext) {
		this.servletContext = servletContext;
	}

}
